﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FacultyExample
{
    class Faculty
    {
        public string Name;
        public List<Chair> chairs = new List<Chair>();

        public static int facultyCount;

        public static Faculty GenerateRandomFaculty()
        {
            Faculty.facultyCount++;
            Faculty faculty = new Faculty();
            faculty.Name = "Faculty of Univercity " + facultyCount++;
            for (int i = 0; i < 3; i++)
            {
                Chair chr = Chair.GenerateRandomChair();
                faculty.chairs.Add(chr);
            }
            return faculty;
        }

        public void PrintFacultyToConsole()
        {
            Console.WriteLine("-------------------------------------");
            Console.WriteLine("Chair Name: {0}", Name);
            Console.WriteLine("-------------------------------------");
            Console.WriteLine();
            foreach (var chair in chairs)
            {
                chair.PrintChairToConsole();
            }
        }
    }
}
